/*  ConwayGo: also called philosophers' football, a game on a go board
    Copyright (C) 2004  Michael Keuchen
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
package de.tabacha.cgo.gui;

import javax.swing.JApplet;
import javax.swing.JRootPane;


/** Applet for playing ConwayGo.
   <br> $Id: ConwayGoApplet.java,v 1.3 2004/07/30 21:06:35 mk Exp $
   @author michael@tabacha.de
   @author $Author: mk $
   @version $Revision: 1.3 $
   @threadsafe false
*/
public class ConwayGoApplet
    extends JApplet
{

    /** Called by the constructor methods to create the default rootPane.
     */
    protected JRootPane createRootPane()
    { return new CgoRootPane(true); }


    /** Returns information about this applet.
     */
    public String getAppletInfo()
    { return "Plays ConwayGo, a simple game played on a go board. See http://conwaygo.sourceforge.net"; }

    /** Initializes the applet.
     */
    public void init()
    { resize(getRootPane().getPreferredSize()); }

    /** Starts the applet.
     */
    public void start()
    { ((CgoRootPane)getRootPane()).startGame(); }

    /** Stops the applet.
     */
    public void stop()
    { ((CgoRootPane)getRootPane()).abortGame(); }

    /** Destroys the applet.
     */
    public void destroy()
    { ((CgoRootPane)getRootPane()).quit(); }
	
}
